import React from 'react'
import {BrowserRouter as Router,Switch,Route, Redirect} from "react-router-dom"

import Home from '../views/Home/HomeIndex'
import Life from '../views/Life/LifeIndex'
import Mine from '../views/Mine/MineIndex'
import Shop from '../views/Shop/ShopIndex'

import FootNav from '../components/FootNav/FootNav'
export default class RouterApp extends React.Component{
    render (){
        return(
            <div>
                <Router>
                <FootNav/>
                 <Switch>
                 <Route strict exact path="/home" component={Home}></Route>
                 <Route strict exact path="/life" component={Life}></Route>
                 <Route strict exact path="/mine" component={Mine}></Route>
                 <Route strict exact path="/shop" component={Shop}></Route>
               
                 <Redirect strict exact from="/" to="/home"></Redirect>
               
                 </Switch>
             </Router>
            </div>
        )
    }
}